home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
WINDWS_U
/
WNDW70
/
W70-VAR.INC
< prev
next >
Wrap
Text File
|
1993-06-10
|
9KB
|
184 lines
{ ========================================================================== }
{ W70-var.inc - Variables for Multi-level windows ver 7.0a, 06-10-93 }
{ }
{ This file contains all the variables needed for WNDW70.TPU. This lets you }
{ know the variables being used, but it cannot be recompiled with WNDW70.PAS }
{ unless you have the complete source code. }
{ Copyright (C) 1993 by James H. LeMay, All rights reserved. }
{ ========================================================================== }
const
{ Change these to suit your data needs. Source code required. }
MaxWndw = 5; { 1 - 254 : windows per video page }
MaxVirtualWndw = 5; { 0 - 254 : total number of virtual windows - 1 }
MaxPageUsed = 1; { 0 - MaxPage : top video page number (usually 0) }
{ This can be greater than an expected MaxPage }
type
{ Place all of your window names needed for random-access here: }
WindowNames = (
Window0, { Reserved for the non-window area. }
Window1, Window2, Window3, Window4, Window5,
aWindow, { A name for non-unique windows. }
FreeWindow); { Reserved for a freed virtual windows stat. }
Borders = (
NoBrdr, BlankBrdr, SingleBrdr, DoubleBrdr, HdoubleBrdr,
VdoubleBrdr, SolidBrdr, EvenSolidBrdr, ThinSolidBrdr1,
ThinSolidBrdr2, LhatchBrdr, MhatchBrdr, HhatchBrdr,
UserBrdr1, UserBrdr2);
BrdrParts = (
BrdrTL,BrdrTH,BrdrTR,BrdrLV,BrdrRV,
BrdrBL,BrdrBH,BrdrBR,BrdrLT,BrdrHL,
BrdrRT,BrdrTT,BrdrVL,BrdrBT,BrdrCL);
BrdrRec =
record
case byte of
1: (TL,TH,TR,LV,RV,BL,BH,BR,LT,HL,RT,TT,VL,BT,CL: char);
2: (BrdrArray: array[BrdrTL..BrdrCL] of char);
end;
{ The first letter of the border acronym means:
T = top B = bottom
V = vertical H = horiz
L = left R = right
C = cross
The second letter is the same except for:
T = tee L = line
Here they are in their relative positions:
TL TH TT TH TR
LV VL RV
LT HL CL HL RT
LV VL RV
BL BH BT BH BR }
DirType = (NoDir,Up,Down,VeryTop,Top,Bottom,VeryBottom,FarLeft,Left,Right,
FarRight,Center,Horiz,Vertical);
WordArray = array[0..32000] of word; { Virtual array }
WordArrayPtrType = ^WordArray;
WndwStatType =
record
WSrow,WScol,WSrows,WScols,WSrow2,WScol2: byte; { Window w/ border }
Wrow ,Wcol ,Wrows ,Wcols ,Wrow2 ,Wcol2: byte; { Window only }
WndwAttr,BrdrAttr,
OrigAttr: integer; { Original window attribute. }
WSbrdr,WSline: Borders;
WSname: WindowNames;
WSwhereR,WSwhereC: byte; { window-relative }
WSmodes: word;
WScursor: word; { cursor mode for the window }
ULcol,ULcols,ULrows: byte; { peculiar Underlay location }
ULbytes: word; { size in bytes for underlay }
ULptr: WordArrayPtrType; { For Underlay }
VScrRec: VScrRecType; { Screen stats for Qwik }
RefRow,RefCol: byte; { Viewed corner in virtual wndw
or original WSrow & WScol for
hidden window }
ViewBrdr: Borders; { Border viewed on the CRT }
VI: word; { Virtual level index }
end;
WndwStatsType = array[0..MaxWndw] of WndwStatType;
{$ifdef AddVirtual }
VirtualStatsType = array[0..MaxVirtualWndw] of WndwStatType;
{$endif }
MarginRec =
record { Margins for limiting movement with MoveWindow or VResizeWindow }
LeftMargin, RightMargin, TopMargin, BottomMargin: byte;
end;
const
Brdr: array [BlankBrdr..UserBrdr2] of BrdrRec =
{ TL,TH,TR,LV,RV,BL,BH,BR,LT,HL,RT,TT,VL,BT,CL }
((BrdrArray:' '), { BlankBrdr }
(BrdrArray:'┌─┐││└─┘├─┤┬│┴┼'), { SingleBrdr }
(BrdrArray:'╔═╗║║╚═╝╠═╣╦║╩╬'), { DoubleBrdr }
(BrdrArray:'╒═╕││╘═╛╞═╡╤│╧╪'), { HdoubleBrdr }
(BrdrArray:'╓─╖║║╙─╜╟─╢╥║╨╫'), { VdoubleBrdr }
(BrdrArray:'█████████─██│█┼'), { SolidBrdr }
(BrdrArray:'█▀████▄██─█▀│▄┼'), { EvenSolidBrdr }
(BrdrArray:'▐▀▌▐▌▐▄▌▐─▌▀│▄┼'), { ThinSolidBrdr1 }
(BrdrArray:'▄▄▄▌▐▀▀▀▌─▐▄│▀┼'), { ThinSolidBrdr2 }
(BrdrArray:'░░░░░░░░░─░░│░┼'), { LhatchBrdr }
(BrdrArray:'▒▒▒▒▒▒▒▒▒─▒▒│▒┼'), { MhatchBrdr }
(BrdrArray:'▓▓▓▓▓▓▓▓▓─▓▓│▓┼'), { HhatchBrdr }
(BrdrArray:'···············'), { UserBrdr1 } { Make your own }
(BrdrArray:'∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙')); { UserBrdr2 } { Make your own }
{ Valid modes for SetWindowModes: }
RelMode = $0001; { 00000001b - Window relative; temporary stats }
PermMode = $0002; { 00000010b - Can't be moved or removed, no underlay}
ShadowLeft = $0004; { 00000100b - Shadow on the left side }
ShadowRight = $0008; { 00001000b - Shadow on the right side }
ShadowTrans = $0010; { 00010000b - Allows transparent shadows }
ZoomMode = $0020; { 00100000b - Zoom effect on Make and AccessWindow }
CursorOffMode = $0040; { 01000000b - Leave cursor off at all times }
HiddenMode = $0080; { 10000000b - Create window while Hidden }
VirtualMode = $0100; { 00000001b - Create Virtual window as well }
SeeThruMode = $0200; { 00000010b - Doesn't clear screen inside window }
NoHideMode = $0400; { 00000100b - Ignores request to hide window }
NoAccessMode = $0800; { 00001000b - Ignores request to access window }
NoMoveMode = $1000; { 00010000b - Ignores request to move/resize window }
{ Other modes for program detection: }
ToCrtMode = $2000; { 00100000b - Writing to CRT }
ToHiddenMode = $4000; { 01000000b - Writing to Hidden window }
ToVirtualMode = $8000; { 10000000b - Writing to Virtual window }
{ This sets up the type of shadows for the entire program }
ShadowColor: integer = LightGray; { Shadow color - opaque or transparent }
ShadowChar: char = ' '; { Shadow character for opaque shadows }
TitleOfs: byte = 1; { # of cols title placed offset from border }
PreferMultiTask: boolean = true; { Use Multitasking buffer if possible. }
var
{ Boolean values corresponding to the above modes. Automatically
set for the window you are in. }
RelFlag, PermFlag, ZoomFlag, HiddenFlag, VirtualFlag, CursorOffFlag,
SeeThruFlag, NoHideFlag, NoAccessFlag, NoMoveFlag,
ToCrtFlag, ToHiddenFlag, ToVirtualFlag, ShadowTransFlag: boolean;
{ -- Keep the following 10 variables in order for PageStatRec! -- }
WndwStat: WndwStatsType;
TopWndwStat: WndwStatType; { Window stats on the top Level Index }
TWS: WndwStatType absolute TopWndwStat; { one and the same }
{$ifdef AddVirtual }
TopVirtualStat: WndwStatType; { Optional virtual stats for top window. }
TVS: WndwStatType absolute TopVirtualStat; { one and the same }
{$endif }
LI, { Top Level Index }
HLI, { Hidden Level Index }
WI: word; { Window Index to save top stat (HLI or LI) }
PLI: byte; { Top Permanent Level Index }
CursorDefault, { Default cursor mode for each window }
WindowModes: word; { Logical sum of all window modes listed above }
Margins: MarginRec; { Limits for moving or resizing windows }
type
PageStatRec =
record
PageWS: WndwStatsType; { Equivalent to WndwStat }
PageTWS: WndwStatType; { Equivalent to TopWndwStat }
{$ifdef AddVirtual }
PageTVS: WndwStatType; { Equivalent to TopVirtualStat }
{$endif }
PageLI,PageHLI,PageWI: word; { Equivalent to LI, HLI, and WI }
PagePLI: byte; { Equivalent to PLI }
PageCursor,
PageModes: word; { Equivalent to WindowModes. }
PageMargins: MarginRec; { Equivalent to Margins. }
end;
PageStatRecs = array[0..MaxPageUsed] of PageStatRec;
var
{$ifdef MultiPage }
PageStat: ^PageStatRecs;
TopPageStat: PageStatRec absolute WndwStat;
{$endif }
{$ifdef AddVirtual }
VirtualStat: ^VirtualStatsType;
VirtualRows, { Default rows for virtual screen. }
VirtualCols: byte; { Default cols for virtual screen. }
VirtualSize: word; { VirtualCols * (VirtualRow+2) * 2 }
{$endif }
MaxValidPage: byte; { The lesser of MaxPage or MaxPageUsed }
ZoomDelay: byte; { Delay in ms between each Qbox for zoom effect }
CrtWI: word; { Active Window Index on CRT. }